<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Created by PhpStorm.
 * User: jinzhao
 * Date: 16-7-28
 * Time: 下午12:53
 */

class Cate_model extends CI_Model{
    public function get()
    {
        return $this->db->get('cate')->result_array();
    }
    public  function update($data)
    {
        return $this->db->update('cate', $data['cname'], $data['cid']);
    }
    public function del($data)
    {
        return $this->db->delete('cate', $data);
    }
    
    public function add($data)
    {
        return $this->db->insert('cate', $data);
    }
    
}